<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>博客管理</title>
<script type="text/javascript" src="../js/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/npm.js"></script>
<link rel="stylesheet" href="../css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="../css/bootstrap.css" />
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/bootstrap-theme.css" />
<style type="text/css">
.sp-a {
	font-size: 16px;
}

.table {
	text-align: center;
}

.form-control {
	width: 110px;
	float: right;
	margin-right: 85px;
}

.btn {
	float: right;
	margin-right: 60px;
}

.btn-td {
	width: 300px;
}
</style>
<script type="text/javascript">

$(function(){
	$(".update").click(function(){
		var account = $(this).parents("tr").find("td").eq(0).text();
		var state = $(this).parents("tr").find("td").eq(4).text();
		var index = $(this).parents("tr").index();
		$("#account").val(account);
		$("#state").val(state);
		
	})
	
})

</script>
</head>
<body>
	<div class="body-blog">
		<div id="body_right_head">

			<img src="../img/文件.png" /><span class="sp"> <a href="#"
				class="sp-a">博客管理</a></span>
		</div>
		<form action="manageblog" method="get">
		<table class="table table-striped table-hover table-bordered">
			<tr class="info">
				<td>博客ID</td>
				<td>用户名</td>
				<td>注册时间</td>
				<td>联系电话</td>
				<td>状态</td>
			</tr>
			<c:forEach items="${userlst}" var="ul">
				<tr>
				
					<td>${ul.getUserAccount()}</td>
					<td>${ul.getName()}</td>
					<td>${ul.getUserRegTime()}</td>
					<td>${ul.getPhone()}</td>
					<td>
						<c:if test="${ul.getState()==0}">正常</c:if>
						<c:if test="${ul.getState()==1}">拉黑</c:if>
						</td>
					<%-- <td class="btn-td">状态改为：
					<c:if test="${ul.getState()==0}">
						<a href="manageblog?userAccount=${ul.getUserAccount() }&state=${ul.getState()}" class="update">拉黑</a>
					</c:if>
						<c:if test="${ul.getState()==1}">
							<a href="manageblog?&userAccount=${ul.getUserAccount() }&state=${ul.getState()}" class="update">正常</a>
						</c:if>
					</td>--%>
				</tr>
			</c:forEach>
		</table>
		<input type="hidden" id="account" name="account"/>
		<input type="hidden" id="state" name="state"/>
		</form>
	</div>
</body>
</html>